<!--  -->
<template>
  <div>A {{ count }}
    <el-button @click="count++">++</el-button>
  </div>
</template>

<script lang='ts' setup>
import { onActivated,onUnmounted,ref,onMounted, onDeactivated} from 'vue'
const count=ref(0);

onMounted(()=>{
  console.log('A组件加载完毕-onMounted')
})
onUnmounted(()=>{
  console.log('A组件卸载完毕-onUnmounted')
})

onActivated(() => {
    console.log("A组件激活了-onActivated");
    
})
onDeactivated(() => {
    console.log("A组件被隐藏了-onDeactivated");
})

</script>
<style scoped>
</style>